using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Net;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;
using ComponentFactory.Krypton.Toolkit;
using DukeyCssFetch.api.mou18.com;
using DukeyCssFetch.Properties;
using MSXML;

namespace DukeyCssFetch.api
{
	// Token: 0x02000003 RID: 3
	public class Comm
	{
		// Token: 0x06000015 RID: 21 RVA: 0x00003274 File Offset: 0x00001474
		static Comm()
		{
			// Note: this type is marked as 'beforefieldinit'.
			Comm.root = AppDomain.CurrentDomain.BaseDirectory;
			Comm.skin = PaletteModeManager.Office2007Blue;
			Comm.IsAgent = false;
			Comm.tagcols = 6;
			Comm.tagbtnWidth = 90;
			Comm.Refer = "";
			Comm.CurrentTag = "dedecms.xml";
			Comm.SaveFolder = "D:\\仿站";
			Comm.CurrentHtmlSource = "";
			Comm.Strbasehref = "";
			Comm.ContainerHtml = "";
			Comm.Fetch_ReplaceWords = "{dede:global.cfg_cmsurl/}|\r\n{dede:global.cfg_cmspath/}|\r\n{dede:global.cfg_templets_skin/}|/templets/default";
			Comm.apibackurl = "";
			Comm.authbackurl = "";
			Comm.showtype = 0;
			Comm.CurrentUrl = string.Empty;
			Comm.recentList = new List<string>();
		}

		// Token: 0x06000014 RID: 20 RVA: 0x00003264 File Offset: 0x00001464
		public Comm()
		{
			
		}

		// Token: 0x06000003 RID: 3 RVA: 0x0000217C File Offset: 0x0000037C
		public static string AssemblyVersion()
		{
			return Assembly.GetExecutingAssembly().GetName().Version.ToString();
		}

		// Token: 0x06000009 RID: 9 RVA: 0x0000264C File Offset: 0x0000084C
		public static bool DownFile(string url, string dir, ref string filename, Dictionary<string, string> replacelist, System.Text.Encoding encoding, FileType filetype, string href, ref Dictionary<string, string> Replacelist, LinkType linktype, SaveType savetype)
		{
			bool result;
			try
			{
				if (linktype == LinkType.Absolute)
				{
					if (!replacelist.ContainsKey(href))
					{
						replacelist.Add(href, url);
					}
					result = false;
				}
				else
				{
					string text = Comm.Html(url, encoding);
					string text2 = Comm.ReplaceLink(url);
					if (filename == "")
					{
						filename = text2.Substring(text2.LastIndexOf("/") + 1);
					}
					filename = Comm.ReplaceBadChar(filename);
					if (!dir.EndsWith("\\"))
					{
						dir = dir.Replace("/", "") + "\\";
					}
					string text3 = "";
					switch (filetype)
					{
					case FileType.Css:
						text3 = AllConfig.css_folder;
						break;
					case FileType.html:
						text3 = AllConfig.html_folder;
						break;
					case FileType.ImportCss:
						text3 = AllConfig.css_folder;
						break;
					}
					if (filetype != FileType.html)
					{
						if (filetype == FileType.Css)
						{
							if (linktype == LinkType.Root_relative)
							{
								text3 = "/" + text3;
							}
							if (filename.Trim() == string.Empty)
							{
								filename = "index.css";
							}
							filename = Comm.smethod_0(text3, filename, Replacelist);
							if (!Replacelist.ContainsKey(href))
							{
								Replacelist.Add(href, text3 + filename);
							}
						}
						else if (filetype == FileType.ImportCss)
						{
							if (filename.Trim() == string.Empty)
							{
								filename = "index.css";
							}
							filename = Comm.smethod_0(text3, filename, replacelist);
							if (!replacelist.ContainsKey(href))
							{
								replacelist.Add(href, filename);
							}
						}
					}
					if (filetype != FileType.html)
					{
						using (Dictionary<string, string>.Enumerator enumerator = replacelist.GetEnumerator())
						{
							while (enumerator.MoveNext())
							{
								KeyValuePair<string, string> current = enumerator.Current;
								if (current.Key.Length > 4)
								{
									text = text.Replace(current.Key, current.Value);
								}
							}
							goto IL_313;
						}
					}
					text = Comm.CurrentHtmlSource;
					foreach (KeyValuePair<string, string> current2 in replacelist)
					{
						if (current2.Key.Length > 4)
						{
							text = text.Replace("\"" + current2.Key + "\"", "\"" + current2.Value + "\"");
							text = text.Replace("'" + current2.Key + "'", "'" + current2.Value + "'");
							text = text.Replace("\\\"" + current2.Key + "\\\"", "\\\"" + current2.Value + "\\\"");
							text = text.Replace("\\'" + current2.Key + "\\'", "\\'" + current2.Value + "\\'");
							text = text.Replace("(" + current2.Key + ")", "(" + current2.Value + ")");
						}
					}
					IL_313:
					text3 = text3.Replace("/", "\\");
					if (!Directory.Exists(dir + text3))
					{
						Directory.CreateDirectory(dir + text3);
					}
					string str = text3 + filename;
					if (filetype == FileType.html)
					{
						if (Comm.Strbasehref.Trim().Length > 0)
						{
							text = text.Replace(Comm.Strbasehref, "");
						}
						if (File.Exists(dir + text3 + filename))
						{
							filename = filename.Split(new char[]
							{
								'.'
							})[0];
							filename = Comm.smethod_1(filename, dir + text3);
							filename += ".html";
							Comm.WriteFile(dir + text3 + filename, text, encoding);
							result = true;
							return result;
						}
					}
					if (savetype == SaveType.Origin)
					{
						Comm.smethod_2(ref url, ref dir);
						Comm.WriteFile(dir + filename, text, encoding);
						result = true;
					}
					else
					{
						Comm.WriteFile(dir + str, text, encoding);
						result = true;
					}
				}
			}
			catch
			{
				result = false;
			}
			return result;
		}

		// Token: 0x06000008 RID: 8 RVA: 0x000023EC File Offset: 0x000005EC
		public static bool Download(string absolute_url, string href, string dir, string filename, ref Dictionary<string, string> replacelist, SaveType savetype, LinkType linktype, bool outlink, FileType filetype)
		{
			bool result;
			try
			{
				if (absolute_url.ToLower() == href.ToLower() && !outlink)
				{
					result = true;
				}
				else if (savetype == SaveType.Origin)
				{
					result = Comm.api.Download(absolute_url, dir);
				}
				else
				{
					if (linktype == LinkType.Absolute)
					{
						if (!replacelist.ContainsKey(href))
						{
							replacelist.Add(href, absolute_url);
						}
					}
					else
					{
						string text = Comm.ReplaceLink(absolute_url);
						if (filename == "")
						{
							filename = text.Substring(text.LastIndexOf("/") + 1);
						}
						if (!dir.EndsWith("\\"))
						{
							dir = dir.Replace("/", "") + "\\";
						}
						WebClient webClient = new WebClient();
						try
						{
							webClient.Credentials = CredentialCache.DefaultCredentials;
							webClient.Headers.Set("Referer", Comm.Refer);
							webClient.Headers.Set("User-Agent", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7");
							string text2 = "";
							switch (filetype)
							{
							case FileType.BackGroundImg:
								text2 = AllConfig.htmlbg_folder;
								break;
							case FileType.Image:
								text2 = AllConfig.images_folder;
								break;
							case FileType.Swf:
								text2 = AllConfig.swf_folder;
								break;
							case FileType.Js:
								text2 = AllConfig.js_folder;
								break;
							case FileType.CssBackGroundImg:
								text2 = AllConfig.cssbg_folder;
								break;
							}
							string text3 = text2;
							if (linktype == LinkType.Root_relative)
							{
								text3 = "/" + text2;
							}
							else if (linktype == LinkType.Relative && filetype == FileType.CssBackGroundImg)
							{
								text3 = text2.Replace(AllConfig.css_folder, "");
							}
							filename = Comm.ReplaceBadChar(filename);
							filename = Comm.smethod_0(text3, filename, replacelist);
							if (!replacelist.ContainsKey(href))
							{
								replacelist.Add(href, text3 + filename);
							}
							text2 = text2.Replace("/", "\\");
							if (!Directory.Exists(dir + text2))
							{
								Directory.CreateDirectory(dir + text2);
							}
							string str = text2 + filename;
							webClient.DownloadFile(absolute_url, dir + str);
							webClient.Dispose();
							result = true;
							return result;
						}
						catch
						{
							webClient.Dispose();
							result = false;
							return result;
						}
					}
					result = false;
				}
			}
			catch
			{
				result = false;
			}
			return result;
		}

		// Token: 0x06000010 RID: 16 RVA: 0x00002F24 File Offset: 0x00001124
		public static long GetFileSize(string url)
		{
			HttpWebResponse httpWebResponse = null;
			long result = -1L;
			try
			{
				httpWebResponse = (HttpWebResponse)Comm.smethod_3(url).GetResponse();
				result = httpWebResponse.ContentLength;
			}
			catch
			{
				return 0L;
			}
			finally
			{
				if (httpWebResponse != null)
				{
					httpWebResponse.Close();
				}
			}
			return result;
		}

		// Token: 0x0600000E RID: 14 RVA: 0x00002DC4 File Offset: 0x00000FC4
		public static System.Text.Encoding GetPageEncoding(string url)
		{
			System.Text.Encoding result;
			try
			{
				WebRequest webRequest = WebRequest.Create(url);
				WebResponse response = webRequest.GetResponse();
				string text = null;
				string text2 = response.Headers["content-type"];
				if (text2 != null)
				{
					text2 = text2.ToLower();
					int num = text2.IndexOf("charset");
					if (num > 0)
					{
						text = text2.Substring(text2.IndexOf("=") + 1);
					}
				}
				if (text == null)
				{
					Stream responseStream = response.GetResponseStream();
					StreamReader streamReader = new StreamReader(responseStream);
					Regex regex = new Regex("<meta.*? charset=(['\"]?).*?(?<code>[^\\s]+)\\1.*?>", RegexOptions.IgnoreCase);
					string input;
					while ((input = streamReader.ReadLine()) != null)
					{
						if (regex.IsMatch(input))
						{
							Match match = regex.Match(input);
							text = match.Groups["code"].Value;
							text = text.Replace("\"", "");
							break;
						}
					}
				}
				System.Text.Encoding encoding = System.Text.Encoding.ASCII;
				if (text != null)
				{
					try
					{
						encoding = System.Text.Encoding.GetEncoding(text);
					}
					catch
					{
						encoding = System.Text.Encoding.GetEncoding("gb2312");
					}
				}
				try
				{
					response.Close();
				}
				catch (Exception)
				{
				}
				result = encoding;
			}
			catch
			{
				result = Comm.GetPageEncodingOfAgent(url);
			}
			return result;
		}

		// Token: 0x06000012 RID: 18 RVA: 0x000030C8 File Offset: 0x000012C8
		public static System.Text.Encoding GetPageEncodingOfAgent(string url)
		{
			try
			{
				HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(url);
				httpWebRequest.Credentials = CredentialCache.DefaultCredentials;
				httpWebRequest.UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7";
				WebResponse response = httpWebRequest.GetResponse();
				string text = null;
				string text2 = response.Headers["content-type"];
				if (text2 != null)
				{
					text2 = text2.ToLower();
					int num = text2.IndexOf("charset");
					if (num > 0)
					{
						text = text2.Substring(text2.IndexOf("=") + 1);
					}
				}
				if (text == null)
				{
					Stream responseStream = response.GetResponseStream();
					StreamReader streamReader = new StreamReader(responseStream);
					Regex regex = new Regex("<meta.*? content=(['\"]?).*?charset=(?<code>[^\\s]+)\\1.*?>", RegexOptions.IgnoreCase);
					string input;
					while ((input = streamReader.ReadLine()) != null)
					{
						if (regex.IsMatch(input))
						{
							Match match = regex.Match(input);
							text = match.Groups["code"].Value;
							break;
						}
					}
				}
				System.Text.Encoding result = System.Text.Encoding.ASCII;
				if (text != null)
				{
					try
					{
						result = System.Text.Encoding.GetEncoding(text);
					}
					catch
					{
						result = System.Text.Encoding.ASCII;
					}
				}
				try
				{
					response.Close();
				}
				catch (Exception)
				{
				}
				return result;
			}
			catch
			{
			}
			return System.Text.Encoding.GetEncoding("gb2312");
		}

		// Token: 0x06000004 RID: 4 RVA: 0x00002194 File Offset: 0x00000394
		public static string Html(string strLink, System.Text.Encoding encoding)
		{
			if (Comm.IsAgent)
			{
				return Comm.HtmlofAgent(strLink, encoding);
			}
			string text;
			try
			{
				string arg = string.Empty;
				if (encoding != null)
				{
					arg = encoding.BodyName;
				}
				string requestUriString = string.Format("http://localhost:64473/sdk.ashx?ac=gethtml&encoding={0}&contenttype={1}&url={2}", arg, "", strLink);
				HttpWebRequest httpWebRequest = WebRequest.Create(requestUriString) as HttpWebRequest;
				httpWebRequest.Headers["Accept-Encoding"] = "gzip,deflate";
				httpWebRequest.AutomaticDecompression = DecompressionMethods.GZip;
				HttpWebResponse httpWebResponse = httpWebRequest.GetResponse() as HttpWebResponse;
				using (Stream responseStream = httpWebResponse.GetResponseStream())
				{
					using (StreamReader streamReader = new StreamReader(responseStream, System.Text.Encoding.UTF8))
					{
						text = streamReader.ReadToEnd();
						streamReader.Close();
						responseStream.Close();
						httpWebResponse.Close();
					}
				}
				if (text.Trim() == "")
				{
					string result = Comm.HtmlofAgent(strLink, encoding);
					return result;
				}
			}
			catch
			{
				string result = Comm.HtmlofAgent(strLink, encoding);
				return result;
			}
			return text;
		}

		// Token: 0x06000011 RID: 17 RVA: 0x00002F90 File Offset: 0x00001190
		public static string HtmlofAgent(string strLink, System.Text.Encoding encoding)
		{
			if (encoding == null)
			{
				encoding = Comm.GetPageEncoding(strLink);
			}
			string result;
			try
			{
				HttpWebRequest httpWebRequest = WebRequest.Create(strLink) as HttpWebRequest;
				httpWebRequest.Headers["Accept-Encoding"] = "gzip,deflate";
				httpWebRequest.AutomaticDecompression = DecompressionMethods.GZip;
				httpWebRequest.Credentials = CredentialCache.DefaultCredentials;
				httpWebRequest.Referer = Comm.Refer;
				httpWebRequest.KeepAlive = true;
				httpWebRequest.AllowAutoRedirect = false;
				httpWebRequest.UserAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7";
				HttpWebResponse httpWebResponse = httpWebRequest.GetResponse() as HttpWebResponse;
				using (Stream responseStream = httpWebResponse.GetResponseStream())
				{
					using (StreamReader streamReader = new StreamReader(responseStream, encoding))
					{
						if (Comm.api == null)
						{
							try
							{
								Comm.api = new DukeyCssFetchAPI();
								Comm.api.Url = "http://115.29.100.11:99/dk31.asmx";
							}
							catch
							{
								MessageBox.Show("连接不上服务器,如果你使用盗版造成损失责任自负!");
								Environment.Exit(0);
							}
						}
						result = streamReader.ReadToEnd();
						streamReader.Close();
						responseStream.Close();
						httpWebResponse.Close();
					}
				}
			}
			catch
			{
				result = "";
			}
			return result;
		}

		// Token: 0x06000002 RID: 2 RVA: 0x000020BC File Offset: 0x000002BC
		public static void InitConfig()
		{
			if (Comm.api == null)
			{
				Comm.api = new DukeyCssFetchAPI();
			}
			if (Comm.api.GetUpdateVersion(Comm.AssemblyVersion()) != "ok")
			{
				MessageBox.Show("该版本已经不能使用,请去官方下载最新版本!");
				throw new Exception("该版本已经不能使用,请去官方下载最新版本!");
			}
			try
			{
				Comm.CurrentTag = Settings.Default.curtag;
				if (string.IsNullOrEmpty(Comm.CurrentTag))
				{
					Comm.CurrentTag = "dedecms.xml";
				}
				Comm.showtype = Settings.Default.showtype;
				Comm.skin = Settings.Default.skin;
				Comm.SaveFolder = Settings.Default.SaveFolder;
			}
			catch
			{
				Comm.CurrentTag = "dedecms.xml";
			}
		}

		// Token: 0x0600000A RID: 10 RVA: 0x00002AB8 File Offset: 0x00000CB8
		public static string ReplaceBadChar(string str)
		{
			if (string.IsNullOrEmpty(str))
			{
				return "";
			}
			string text = "@@,+,',--,%,^,&,?,(,),|,*,<,>,[,],{,},/,\\,;,:,\",\"\"";
			string[] array = text.Split(new char[]
			{
				','
			});
			string text2 = str.Trim();
			for (int i = 0; i < array.Length; i++)
			{
				if (array[i].Length > 0)
				{
					text2 = text2.Replace(array[i], "");
				}
			}
			return text2;
		}

		// Token: 0x06000007 RID: 7 RVA: 0x00002364 File Offset: 0x00000564
		public static string ReplaceLink(string link)
		{
			Uri uri = new Uri(link);
			string arg_0D_0 = uri.Host;
			if (uri.Port == 80)
			{
				return uri.Scheme + "://" + uri.Host + uri.AbsolutePath;
			}
			return string.Concat(new object[]
			{
				uri.Scheme,
				"://",
				uri.Host,
				":",
				uri.Port,
				uri.AbsolutePath
			});
		}

		// Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
		public static void SaveConfig()
		{
			try
			{
				Settings.Default.curtag = Comm.CurrentTag;
				Settings.Default.showtype = Comm.showtype;
				Settings.Default.skin = Comm.skin;
				Settings.Default.SaveFolder = Comm.SaveFolder;
				Settings.Default.Save();
			}
			catch
			{
			}
		}

		// Token: 0x0600000B RID: 11 RVA: 0x00002B20 File Offset: 0x00000D20
		private static string smethod_0(string string_0, string string_1, Dictionary<string, string> replacelist)
		{
			if (replacelist.ContainsValue(string_0 + string_1))
			{
				string text = string_1.Split(new char[]
				{
					'.'
				})[0];
				string s = text.Substring(text.Length - 1, 1);
				int num = 0;
				if (int.TryParse(s, out num))
				{
					text = text.Remove(text.Length - 1, 1) + (num + 1).ToString();
				}
				else
				{
					text += "01";
				}
				return Comm.smethod_0(string_0, text + "." + string_1.Split(new char[]
				{
					'.'
				})[1], replacelist);
			}
			return string_1;
		}

		// Token: 0x0600000C RID: 12 RVA: 0x00002BCC File Offset: 0x00000DCC
		private static string smethod_1(string string_0, string string_1)
		{
			string s = string_0.Substring(string_0.Length - 1, 1);
			int num = 0;
			if (int.TryParse(s, out num))
			{
				string_0 = string_0.Remove(string_0.Length - 1, 1) + (num + 1).ToString();
			}
			else
			{
				string_0 += "01";
			}
			if (File.Exists(string_1 + string_0 + ".html"))
			{
				return Comm.smethod_1(string_0, string_1);
			}
			return string_0;
		}

		// Token: 0x0600000D RID: 13 RVA: 0x00002C44 File Offset: 0x00000E44
		private static void smethod_2(ref string string_0, ref string string_1)
		{
			try
			{
				if (string_0.Contains("?"))
				{
					string_0 = string_0.Remove(string_0.IndexOf("?"), string_0.Length - string_0.IndexOf("?"));
				}
				if (string_0.Contains("?"))
				{
					string_0 = string_0.Remove(string_0.IndexOf("&"), string_0.Length - string_0.IndexOf("&"));
				}
				if (string_0.Contains("?"))
				{
					string_0 = string_0.Remove(string_0.IndexOf("#"), string_0.Length - string_0.IndexOf("#"));
				}
				if (!string_1.EndsWith("\\"))
				{
					string_1 = string_1.Replace("/", "") + "\\";
				}
				Uri uri = new Uri(string_0);
				string str = uri.Host + "\\";
				string text = string_0.Replace("//", "");
				int num = text.IndexOf("/");
				int num2 = text.LastIndexOf("/");
				text = text.Substring(num + 1, num2 - num);
				text = text.Replace("/", "\\");
				string_1 = string_1 + str + text;
				if (!Directory.Exists(string_1))
				{
					Directory.CreateDirectory(string_1);
				}
			}
			catch
			{
			}
		}

		// Token: 0x0600000F RID: 15 RVA: 0x00002EFC File Offset: 0x000010FC
		private static HttpWebRequest smethod_3(string string_0)
		{
			HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(string_0);
			httpWebRequest.Credentials = CredentialCache.DefaultCredentials;
			return httpWebRequest;
		}

		// Token: 0x06000005 RID: 5 RVA: 0x000022B0 File Offset: 0x000004B0
		public static string StringDeCompress(string strCompressed)
		{
			StringBuilder stringBuilder = new StringBuilder();
			int num = 0;
			byte[] buffer = Convert.FromBase64String(strCompressed);
			byte[] array = new byte[4096];
			Stream stream = new GZipStream(new MemoryStream(buffer), CompressionMode.Decompress);
			while (true)
			{
				int num2 = stream.Read(array, 0, array.Length);
				if (num2 <= 0)
				{
					break;
				}
				num += num2;
				stringBuilder.Append(System.Text.Encoding.Unicode.GetString(array, 0, num2));
			}
			stream.Close();
			return stringBuilder.ToString();
		}

		// Token: 0x06000013 RID: 19 RVA: 0x00003208 File Offset: 0x00001408
		public static bool UrlExistsUsingXmlHttp(string url)
		{
			bool result;
			try
			{
				XMLHTTPRequest xMLHTTPRequest = new XMLHTTPRequestClass();
				xMLHTTPRequest.open("HEAD", url, false, null, null);
				xMLHTTPRequest.send("");
				result = (xMLHTTPRequest.status == 200);
			}
			catch
			{
				result = false;
			}
			return result;
		}

		// Token: 0x06000006 RID: 6 RVA: 0x00002324 File Offset: 0x00000524
		public static void WriteFile(string Path, string Strings, System.Text.Encoding encode)
		{
			if (!File.Exists(Path))
			{
				FileStream fileStream = File.Create(Path);
				fileStream.Close();
			}
			StreamWriter streamWriter = new StreamWriter(Path, false, encode);
			streamWriter.Write(Strings);
			streamWriter.Close();
			streamWriter.Dispose();
		}

		// Token: 0x0400000D RID: 13
		public static DukeyCssFetchAPI api;

		// Token: 0x0400000E RID: 14
		public static string apibackurl;

		// Token: 0x0400000F RID: 15
		public static string authbackurl;

		// Token: 0x0400000B RID: 11
		public static string ContainerHtml;

		// Token: 0x04000009 RID: 9
		public static string CurrentHtmlSource;

		// Token: 0x04000007 RID: 7
		public static string CurrentTag;

		// Token: 0x04000011 RID: 17
		public static string CurrentUrl;

		// Token: 0x0400000C RID: 12
		public static string Fetch_ReplaceWords;

		// Token: 0x04000003 RID: 3
		public static bool IsAgent;

		// Token: 0x04000012 RID: 18
		public static List<string> recentList;

		// Token: 0x04000006 RID: 6
		public static string Refer;

		// Token: 0x04000001 RID: 1
		public static string root;

		// Token: 0x04000008 RID: 8
		public static string SaveFolder;

		// Token: 0x04000010 RID: 16
		public static int showtype;

		// Token: 0x04000002 RID: 2
		public static PaletteModeManager skin;

		// Token: 0x0400000A RID: 10
		public static string Strbasehref;

		// Token: 0x04000005 RID: 5
		public static int tagbtnWidth;

		// Token: 0x04000004 RID: 4
		public static int tagcols;
	}
}
